<template>
  <div class="paramsinfo" v-if="Object.keys(paramInfo).length !== 0">
    <!-- 尺码参数数据 -->
    <table v-for="(table, index) in paramInfo.sizes"
           class="infosize" :key="index">
      <tr v-for="(tr, indey) in table" :key="indey">
        <td v-for="(td, indez) in tr" :key="indez">{{td}}</td>
      </tr>
    </table>
    <!-- 商品参数 -->
     <table class="infoparam">
      <tr v-for="(info, index) in paramInfo.infos">
        <td class="info-param-key">{{info.key}}</td>
        <td class="param-value">{{info.value}}</td>
      </tr>
    </table>
    <!-- 详情图片 -->
    <div class="infoimg" v-if="paramInfo.image.length !== 0">
      <img :src="paramInfo.image" alt="">
    </div>
  </div>
</template>

<script>
export default {
  name: 'detailgoodsparams',
  props: {
    paramInfo: {
      type: Object,
      default() {
        return {}
      }
    }
  }
}
</script>

<style lang="stylus" scoped>
.paramsinfo
  padding: 20px 15px;
  font-size: 14px;
  border-bottom: 5px solid #f2f5f8;
  .infosize
    width: 100%
    border-collapse: collapse
    tr
      height: 42px
      border-bottom: 1px solid rgba(100,100,100,.1)
  .infoparam
    width: 100%
    border-collapse: collapse
    tr
      height 42px
      border-bottom: 1px solid rgba(100,100,100,.1)
      .info-param-key
        width 95px
      .param-value
        color #ff8198
  .infoimg
    img
      width 100%
</style>